This returns the string passed in to babl_format_new - without the space
suffix that babl_get_name does for non-sRGB formats.
BABL_CLASS_IMPLEMENT (format)
+const char *
+babl_format_get_encoding (const Babl *babl)
+{
+ static char ret[256];
+ const char *name = babl_get_name (babl);
+ strcpy (&ret[0], name);
+ if (babl_format_get_space (babl) != babl_space ("sRGB"))
+ {
+
+ if (strstr (ret, "-space"))
+ *strstr (ret, "-space") = '\0';
+
+ name = &ret[0];
+ }
+ return name;
+}
+
const Babl *
babl_format_with_space (const char *name, const Babl *space)
{
const Babl *trc_green,
const Babl *trc_blue);
+/**
+ * babl_format_get_encoding:
+ *
+ * Returns the components and data type, without space suffix.
+ */
+const char * babl_format_get_encoding (const Babl *babl);
#ifdef __cplusplus
}
babl_format_get_n_components
babl_format_get_space
babl_format_get_type
+babl_format_get_encoding
babl_format_has_alpha
babl_format_is_format_n
babl_format_is_palette